#!/usr/bin/env bash
service ssh start
# Select node type
if [[ "${1}" = 'namenode' ]]; then
  /opt/util/bin/start-hadoop-namenode $2
elif [[ "${1}" =  'datanode' ]]; then
  /opt/util/bin/start-hadoop-datanode $2 $3
else
  echo "Invalid command '${1}'" >&2
  exit 1
fi
